<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/oversea.js"></script>
<title>{{$web_title}}</title>
<body class="withvernav">
    <script language="javascript">
		function outputexl(infotype){
			var filename=$("#pagetitle").html();
			var htmldata=$("#alldata").val();
			
			if(infotype=='exist'){
				$("#filename").val(filename+"_正常");
				htmldata=$("#existdata").val();
			}else if(infotype=='notexist'){//
				$("#filename").val(filename+"_异常");
				htmldata=$("#notexistdata").val();
			}else{//all
				$("#filename").val(filename);	
			}
			$("#htmldata").val(htmldata);
			$("#deliverForm").submit();
			return;
		}
		
		function  updateRealExpPrice(){
			var point=$("#point").val();
			if(!confirm('确定更新真实运费信息吗?每个运单运费将乘于折扣'+point)){
				return;
			}
			var htmldata=$("#existdata").val();
			var diff_data=$("#notexistdata").val();
			$("#up_expdata").val(htmldata);
			//$("#diff_data").val(diff_data);
			$("#btn2").attr("disabled",true);
			$("#updateform").submit();
			//$.post("/CheckExpressPrice/ajaxbutton", {"op": "updateRealExpPrice","up_expdata":htmldata},
			//function(data){
			//	alert('真实物流费用与称重更新完成！');
			//},"json");
		}

		
	</script>
<style type="text/css">
.stdtable tbody tr td{padding:3px 5px;}
</style>
<div class="bodywrapper">
    {{include file='/public/leftmenu.tpl'}}
    <div class="centercontent tables">
        <div class="pageheader notab">
            <h1 class="pagetitle" id="pagetitle">{{$web_title}}</h1>
            <span class="pagedesc"></span>
        </div>
                <input type="hidden" name="existdata" id="existdata" value='{{$existdata_json}}'>
                <input type="hidden" name="notexistdata" id="notexistdata" value='{{$notexistdata_json}}'>
                <input type="hidden" name="alldata" id="alldata" value='{{$alldata_json}}'>
        <!--pageheader-->
        <form method="post" action="/CheckExpressPrice/ajaxbutton" target="_blank" name="deliverForm" id="deliverForm">
            <div class="page" style="height:28px;padding:2px 20px;">
                <span style="float:left;border:0px;background:none;"><a href="javascript:outputexl('exist')">导出已找到单号的交运记录</a> <a href="javascript:outputexl('notexist')">导出未找到单号及重量异常的交运记录</a> <a href="javascript:outputexl('all')">导出所有结果excel</a></span>
               <span style="float:right;border:0px;background:none;"> &nbsp; <a href="javascript:history.back();">返回上页</a></span>
                <input type="hidden" value="outputExl2" name="op" id="op">
                <input type="hidden" value="" name="filename" id="filename">
                <input type="hidden" value="" name="htmldata" id="htmldata">
            </div>
       </form>

        <div id="contentwrapper" class="contentwrapper"><table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            	<thead>
                <tr bgcolor="#EEEEEE">
                   <th class="head1">EXCEL&nbsp;行号</th>
                    <th class="head1">运单号</th>
                    <th class="head1">发件日期</th>
                    <th class="head1">重量</th>
                    <th class="head1">复漫称重</th>
                    <th class="head1">资费</th>
                    <th class="head1">复漫预估运费</th>
                    <th class="head1">复漫订单号</th>
                </tr>
                </thead>

                {{foreach from=$notexistdata item=li key=key}}
                    <tr >
                      <td {{if $li.orderId=="" and $li.id neq '合计'}}style=" background:red"{{/if}}>{{$li.id}}</td>
                      <td>{{$li.deliverNumber}}</td>
                        <td>{{$li.deliverDate}}</td>
                        <td>
                           {{$li.deliverWeight}}                       </td>
                        <td>  {{$li.weight}}  </td>
                      <td>{{$li.deliverFee}}</td>
                        <td>{{$li.fee}}</td>
                        <td>
                        {{if $li.isform==1}}
                        	<a href="http://192.168.1.100:89/eshop/order.do?method=edit&orderid={{{{$li.orderId}}}}" target="_blank">{{$li.orderId}}</a>
                          {{elseif $li.isform==3}}
                            <a href="/oversea/showtask/{{{{$li.oId}}}}" target="_blank">{{$li.orderId}}</a>
                        {{else}}
                        	<a href="/orderlist/editorder?sn={{{{$li.orderId}}}}" target="_blank">{{$li.orderId}}</a>
                        {{/if}}                        </td>
                    </tr>
                {{/foreach}}
{{foreach from=$waring_arr item=li key=key}}
                    <tr >
                      <td style="background:{{if $li.weight_waring==1}}#FF9900{{else}}#33CC00{{/if}}">{{$li.id}}</td>
                      <td>{{$li.deliverNumber}}</td>
                        <td>{{$li.deliverDate}}</td>
                        <td style="background:{{if $li.weight_waring==1}}#FF9900{{else}}#33CC00{{/if}}">
                           {{$li.deliverWeight}}                       </td>
                        <td>  {{$li.weight}}  </td>
                      <td>{{$li.deliverFee}}</td>
                        <td>{{$li.fee}}</td>
                        <td>
                        {{if $li.isform==1}}
                        	<a href="http://192.168.1.100:89/eshop/order.do?method=edit&orderid={{{{$li.orderId}}}}" target="_blank">{{$li.orderId}}</a>
                          {{elseif $li.isform==3}}
                            <a href="/oversea/showtask/{{{{$li.oId}}}}" target="_blank">{{$li.orderId}}</a>
                        {{else}}
                        	<a href="/orderlist/editorder?sn={{{{$li.orderId}}}}" target="_blank">{{$li.orderId}}</a>
                        {{/if}}                        </td>
                    </tr>
                {{/foreach}}
                {{foreach from=$chargeslist item=li key=key}}
                    <tr >
                      <td {{if $li.orderId=="" and $li.id neq '合计'}}style=" background:red"{{/if}}>{{$li.id}}</td>
                      <td>{{$li.deliverNumber}}</td>
                        <td>{{$li.deliverDate}}</td>
                        <td> {{$li.deliverWeight}}                       </td>
                        <td>  {{$li.weight}}  </td>
                      <td {{if $li.id eq '合计'}} colspan="3"{{/if}}>{{$li.deliverFee}}&nbsp; {{if $li.id eq '合计'}}{{$li.fee}}{{/if}}</td>
                      {{if $li.id neq '合计'}}
                        <td>{{$li.fee}}</td>
                        <td>
                        {{if $li.isform==1}}
                        	<a href="http://192.168.1.100:89/eshop/order.do?method=edit&orderid={{{{$li.orderId}}}}" target="_blank">{{$li.orderId}}</a>
                          {{elseif $li.isform==3}}
                            <a href="/oversea/showtask/{{{{$li.oId}}}}" target="_blank">{{$li.orderId}}</a>
                        {{else}}
                        	<a href="/orderlist/editorder?sn={{{{$li.orderId}}}}" target="_blank">{{$li.orderId}}</a>
                        {{/if}}
                       </td>
                       {{/if}}
                       
                    </tr>
                {{/foreach}}
                <tr >
                  <td colspan="8" align="center" id="updatetd">
                  <form method="post" action="/CheckExpressPrice/ajaxbutton?op=updateRealExpPrice" id="updateform" target="_blank">
                  真实运费折扣：
                    <input type="text" style="width:50px;" value="1" name="point" id="point">(例：75折则0.75)
                  <input type="hidden" value="" name="up_expdata" id="up_expdata">
                  <input type="hidden"  name="diff_data" id="diff_data" value='{{$notexist_json}}'>
                  <input type="hidden" value="{{$selectMonth}}" name="selectMonth" id="selectMonth" >
                  <input type="hidden" value="{{$deliverType}}" name="deliverType" id="deliverType" >
                  <input type="hidden" name="total_money" id="total_money" value="{{$total_money}}">
                  <input type="hidden" name="zhifa_money" id="zhifa_money" value="{{$zhifa_money}}">
                  <input type="hidden" name="haiwai_money" id="haiwai_money" value="{{$haiwai_money}}">
                  <input type="hidden" name="notexist_total" id="notexist_total" value="{{$notexist_total}}">
                  <input type="hidden" name="waring_total" id="waring_total" value="{{$waring_total}}">
                  
                  <button id="btn2" type="button" onClick="return updateRealExpPrice()" class="submit radius2">确认对帐结果，更新真实物流费用</button>
                  </form>
                  </td>
          </tr>
            </table>
      </div>
            <br />
            <br />
        </div>
    </div>

</body>
</html>